package com.zr.share.enums;

/**
 * @ClassName InquiryEnum
 * @Description TODO
 * @Author Jiakui_Ma
 * @Date 2019/11/14 13:06
 */
public enum InquiryEnum {

    purchaseInquiry("购买询价", 1),
    handleInquiry("处理询价", 2),
    scrapInquiry("报废询价", 0);
    private String name;
    private Integer index;

    InquiryEnum(String name, Integer index) {
        this.name = name;
        this.index = index;
    }
    public static String getName(int index) {
        for (InquiryEnum c : InquiryEnum.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }
}
